<?php
/**
 * 系统主界面
 *
 * @category     Shuxun Cms
 * @date         2015年10月18日
 * @author       Shuxun Team <kaiping.jiang@scshux.com>
 * @file         IndexController.php
 */
namespace Scshux\Backend\Controllers;
use Scshux\Mvc\SModel;
use Scshux\Mvc\SQuery;
use Scshux\Utils\Uploader;
class IndexController extends  ControllerBase
{
	/**
	 * 系统框架页面
	 */
	public  function  indexAction()
	{
		$goodsModel = new SModel('goods');
		//新增语言过滤
		$site_id = $this->getCore()->getSiteID();
		$where = ' site_id= '.$site_id;
		
		$goodsItems = $goodsModel->query($where,'goods_id,goods_name,click_count','goods_id','desc',6);
		$this->view->setVar('goodsItems', $goodsItems);

		$articleModel = new SModel('article');
		$articleItems = $articleModel->query($where,'id,title,clicked','id','desc',6);
		$this->view->setVar('articleItems', $articleItems);
		$this->view->setVar('server_name', $_SERVER['SERVER_SOFTWARE']);
		$this->view->setVar('max_upload_size',Uploader::getUploadMaxSize());
		$messageModel = new SModel('message');
		$messageItems = $messageModel->query($where,'*','id','desc',6);
		$this->view->setVar('messageItems', $messageItems);


	}

}